using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using BlogLite.Models.Database;

[assembly: WebActivator.PreApplicationStartMethod(typeof(BlogLite.SQLCEEntityFramework), "Start")]

namespace BlogLite {
    public static class SQLCEEntityFramework {
        public static void Start() {            
            Database.DefaultConnectionFactory = new SqlCeConnectionFactory("System.Data.SqlServerCe.4.0");
            Database.SetInitializer(new DropCreateDatabaseIfModelChanges<BlogLiteContext>());
        }
    }
}
